/**************************************************************************
* File:            2satgen.                                               *
* Description:	   Genearate different disjunct. Based on 2sat.h          *
* Author:          Zhuk Artsem, 399                                       *
**************************************************************************/
#pragma once

#include "2sat.h"
#include <vector>

std::vector<std::vector<Disjunct>> getAllInputs(int n){
	int count = n*(2 * n + 1);
	int max_mask = 1 << count;

	std::vector<std::vector<Disjunct>> ans;
	std::vector<Disjunct> cur;

	for (int mask = 0; mask < max_mask; ++mask){
		for (int i = 0, bit = 1; i < 2 * n; ++i)
		for (int j = i; j < 2 * n; ++j, bit <<= 1)
		if (bit&mask)
			cur.emplace_back(i / 2, i % 2, j / 2, j % 2);
		ans.push_back(cur);
		cur.clear();
	}

	return ans;
}

std::vector<Disjunct> getRandomInput(int n, int m){
	std::vector<Disjunct> ans;
	for (int i = 0; i < m; ++i){
		ans.emplace_back(rand() % n, rand() % 2, rand() % n, rand() % 2);
	}
	return ans;
}